import http from '@/utils/http'
export const getGoodsApi = async (data) => {
    const url = '/api/goodslist'
    return http.get(url,data)
}

export const getBannerList = async () => {
    const url = '/api/bannerlist'
    return http.get(url)
}

export const addBannerApi = async (data) => {
    const url = '/api/banneradd'
    return http.post(url, data)
}

export const delBannerApi = async (data) => {
    const url = '/api/bannerdelete'
    return http.post(url, { id : data })
}

export const setBannerApi = async (data) => {
    const url = '/api/banneredit'
    return http.post(url, data)
}

export const getBannerApi = async (data) => {
    const url = '/api/bannerinfo'
    return http.get(url,{params:{id: data}})
}
